package com.huawei.appmarket.service.infoflow.card;

import android.content.Context;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.infoflow.bean.InfoFlowOpenVideoCardBean;
import com.huawei.appmarket.service.infoflow.cards.card.BaseInfoFlowCard;
import o.dof;
import o.epv;
import o.eqx;
import o.evp.b;
import o.evt;
import o.ewm.j;
import o.exc;

public class InfoFlowOpenVideoCard extends BaseInfoFlowCard<exc> {
    public InfoFlowOpenVideoCard(Context context) {
        super(context);
    }

    public void ˊ(exc o_exc) {
        super.ˊ(o_exc);
        ((exc) ʾ()).ˋ.getLayoutParams().height = (int) (((float) this.ˋ) * epv.ʼ());
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (cardBean instanceof InfoFlowOpenVideoCardBean) {
            InfoFlowOpenVideoCardBean infoFlowOpenVideoCardBean = (InfoFlowOpenVideoCardBean) cardBean;
            ॱ(infoFlowOpenVideoCardBean);
            ((exc) ʾ()).ˏ.setText(infoFlowOpenVideoCardBean.O_());
            ˋ(((exc) ʾ()).ॱ, infoFlowOpenVideoCardBean.ˋʻ());
            ᐝ(((exc) ʾ()).ˏ);
        }
    }

    private void ॱ(InfoFlowOpenVideoCardBean infoFlowOpenVideoCardBean) {
        int i = j.ʿˈ;
        int i2 = j.ʿʿ;
        String str = (String) this.ˊˋ.getTag(i);
        String str2 = (String) this.ˊˋ.getTag(i2);
        if (!dof.ˋ(str) && str.equals(infoFlowOpenVideoCardBean.ॱ())) {
            return;
        }
        if (dof.ˋ(str2) || !str2.equals(infoFlowOpenVideoCardBean.ˊ())) {
            str2 = infoFlowOpenVideoCardBean.ˊ();
            String ॱ = infoFlowOpenVideoCardBean.ॱ();
            this.ˊˋ.setTag(i, ॱ);
            this.ˊˋ.setTag(i2, str2);
            if (((exc) ʾ()).ˋ != null) {
                ((exc) ʾ()).ˋ.setVideoBaseInfo(new b().ˎ(infoFlowOpenVideoCardBean.ʽ()).ˊ(str2).ˋ(ॱ).ˏ(infoFlowOpenVideoCardBean.ͺˏ()).ॱ(infoFlowOpenVideoCardBean.u_()).ʼ(infoFlowOpenVideoCardBean.ꜞ()).ᐝ(infoFlowOpenVideoCardBean.ᶥ()).ʻ(evt.ˏ(infoFlowOpenVideoCardBean.sp_)).ॱॱ(infoFlowOpenVideoCardBean.ॱـ()).ॱ());
                eqx.ˏ(((exc) ʾ()).ˋ.ॱॱ(), str2, "image_default_icon");
            }
        }
    }
}
